made parser more lenient
first pass of handshake
cleaned up code and source/destination handshaking