GUACAMOLE-1622: Separated logic into single responsibility functions.
GUACAMOLE-1622: Separated logic into single responsibility functions.

mike-jumper/incubator-guacamole-server,mike-jumper/incubator-guacamole-server,apache/guacamole-server,mike-jumper/incubator-guacamole-server,apache/guacamole-server,mike-jumper/incubator-guacamole-server,apache/guacamole-server