A bit of refactoring and server request format change