Removing unecessary variable assignment