Added database functionality and fixed the twitter array stuff