Renamed some vars and functions for code readability.