Requests are now stored per account.

Extracted database to a separate file.
Implemented Database#clear method.
brought in changes from Michals branch