Renamed variable and remove unused variable