Comments and code cleanup