Tidied and javadoc'd the model package.