refactor the code to be more modular and not all in one class.
had to add create method to the main class to create the session, also the session is forced to be two phase init and not one.