refactored if statement that checks on whether to show open or closed view
abstracted out object model. documented mainjs. added tomorrow funcitonality'