add mongoDB support for different enviroment
refactoring twit controller