The last byte of the frame is now just a simple checksum. Cleaned up the code.