added layers of absatarction to server class and views