added tests and pulled model classes into their own files