refactored models to use mongoose; removed unnecessary lib scripts; simplified files