Added minor low-level optimization to forward-search methods.
Refactored configuration obtention methods.
Added javadoc comments to most interfaces and classes.
Added more javadoc.