Cleaned the functions file and added Doxygen markup.