added model objects for everything.
refactoring.