moved logic around a bit (end of useless commit messages)
removed mongoose dependency
removed dependencies