Some refactoring and added guice injections
improved handling of reponse content type and character encoding