Added new configuration and customization options.
Added javadoc comments.
Fixed tests.