Replaced yoda conditions, removed test functions that were written in database.py, added httpretty decorators to http requesting function. Sorted imports. Fixed indentation in Failure object creation functions. Replaced format function used in string format with newer format function.