removes unecessary variable declarations