Added parser.
Now users can set up the number of refinements n and distance d via box