Fixed a typedef/enum mixup
Expanded function documentation, got rid of Doxygen warnings