* some code cleanup
* it has been tested with an exploded class directory and also with a jar file.
* added some comments