Updates to clean and organize the code.