Improved the code for the batch modes

Classification hierarchy is no longer hardcoded (is obtained from the configuration file) and code cleanup.
Script updated for the updated configuration file format

Also run the ANN if there is only one class set, but not if there are none set. And some code cleanup.