Start adding some doxygen style documentation of functions