Minor changes. Added a few test methods.