added db support, cleaned up code, can now get tweets from db to csv