Added/refactored comments to support Doxygen