Renamed some functions for more consistency.