Refactored functions to be consistent in the naming conventions across files