add ability to clear the database

also updated some tests and added minimal validations to models