fixed latin hypercube sampling bug and promoted changed search space code to rest of lib