Starting to clean up the code.