cleaned out some of the sample app code and restructed some of the classes