Expanded function documentation, got rid of Doxygen warnings