Implemented intelligent edge selection for picking variables!