Update Mainclient class for work with hibernate