Changed methods for search builtin.
- No need for a loop in the search one builtin.
- Fixed memory leak when updating constraint spaces.