matroskadec: reorder some functions in a more logical order