General housekeeping and tidying up a bit. Removed uneeded variables, spaces, etc.
Reorganized the global variables and fixed the delay in select that made the update frequency inaccurate.
Fixed issue with get_byte() and b64decode() raising an exception with malformed packets.