Removed unused function. Renamed variables.