Refactored serial reading code to remove GUI dependence, and added static method to read from serial and create Microtops object.