Avoid allocating memory when creating a new variable, code clean-up