Removed deprecated code and added working session handling in
ServiceMock.