more commenting and cleanup