Replaced all the old function calls to the new functions calls and consolidated all functions in the functions namespace.