Cleans some code and trims the program's output.