Changing some function names and some documentation

This is a fixed version of my previous PR.