initial unit test working
More unit tests for database, fixed an error with tweet insert sql

Some refactoring in tweet_handler.py