Initial refactoring to be built on top of CAS Java client 3.3