Mongo implemented and some improvements made/bugs fixed