Serial port moved out from main class