code cleanups, doxygen (haven't touched context yet)