Refactored code to use public private scope and split off the model classes into individual files