Better separated out database-implementation functions from the Processor. Additionally made Processor a module. Cleaned up code.
Basic saving of data to the database.