M Operators: a generalisation of Weyl-Titchmarsh theory