Completed implementation of keep-alive
Changed keep-alive packet to packet 9.
Tests outstanding.