Cleaning up parts of the code.