Added standard imput and refactor serial port class