Fixed some pylint issues and added a simple protocol for sending/receiving messages