Run main code through autopep8
Some basic refactors of booleans into values
refactor so only read/writeMsg routines touch the msg file directly
small refactors for clarity and brevity
factor out sendControlCmd as the only routine to touch the ctl file directly