fix issues with molgenis header 590,586; added tests; change help exit; code refactoring all around

...etc.