Mass commit:
- moved mex to private
- added more functionality to classes as needed