Tidying up.

Completely untested code.
Fix spacing in previous commit.
Remove pointless inheritDocs
Some more tidying.

Fix a bug in the previous tidying.
Fix at least one potential NPE.
Merge pull request #60 from greboid/master

General tidying