Use line buffered output.
Made strings in functions constant.
Use constant length string for time.