Refactoring the names of several of the functions to be consistent with c naming conventions.