added tests and refactored a few things

Added database_cleaner