Make the HDF5 and GRASS64 paths optionally modifiable

Plus some code cleanup.