Some more model changes and some more api and mongo implementation