Refactor model mappings, fix mapping names, fix some bugs