Tidied up configuguration a bit more.
Added piles of javadoc.