Rename variables and small adjusts