more cleanup and mongoose added