added module-level documentation
various clean-ups through-out
various clean-ups through-out