Re-factored a couple of items related to test, and better comments