Update comments and code organization