Given that $edit and $veEdit are used only here it would make sense to declare them only in the scope of this function.