Reordered some comments for clarity