Fixed some bugs in the buffer, moved the onData function out of the connection and into its own In object and added the onLine function