Refactoring existing Twitter code and added stuff to enable database connectivity