Renamed some function for better clarity.