(Merger) Update javadoc and clean signatures.
(Merger) Move all the pattern stuff to its own package.