Clean up code and script output