Cleaning up and writing comments