Fix reduntant method and rename variables.