Comments and code cleanup for clarity.