Added refactored library with splash page + handshake modes working; Note the use of contexts to hold state that passes between the socket handler and the ssh handler