Added the leftover functions and some documentation