Fixed bug with open, started model class

Open was throwing errors when you pressed cancel. started creation of
model class for easier interaction between our models without going
through the controller.