Update comments. Clean up code