removed depricated library include
moved from '$scope' ti using 'this'
cleaned up page layouts and created Main factory to hold page title etc