Renamed functions day forwarding/rewinding function, still not happy about them
Extracted database related operations into a separate class