Removes unnecessary variable declarations.