Refactored tests and functions to allow an API client to use a timespan
Added BadRequest handler
Removed most Option wrappers
Modified tests so database no longer needs to be emptied