General code cleanup. Moved all serial operations into the OS5000 class. Moved all variables to be private members and made helper functions to get the values needed elsewhere.