add javadoc
small code cleanup
new option to additionally activate categories