A bit of refactoring and added a untested mongodb setup for traking queue
Change db crud in controller