Cleaning up variable references