fixed #30
includes refactoring the morph core classes