Wrote main function and created getter for serial port.