added datetime object to database to make life easier. Refactored entire backend.