Changed formatting and added serial writer.