Finish refactoring Model; Make math model a plugin stub