added some validations to models, fixed some bugs, and also did some styling.  Cleaned up some code and removed lots of unnecessary log statements.