Renamed some of the functions to avoid confusion.