Code commenting and cleanup