Cleans up the code.