refactoring package layout, adding logging to all methods, hiding server details from client