1. Added doxygen-style comments to document all functions.