updated source file

1. Added the global variables and moved them to the top for easier
modifications
2. The number of points for the probability plot is modifiable
3. Added system calls to wc and grep for *nix systems for the 'Checking
dimensions' part
4. Cleanup of the optimal sampling selection algorithm, all tested
samplings are now added to the files