further cleanups; some additional documentation