minor refactoring and added index view analysis - todo, logging, mongodb update