Javadoc updated.

Added missing javadoc.
Better explanations for various concepts and patterns.
Minor visibility changes.