Added jUnit for testing the model.
Some code cleanup.