Added public methods for testing using JUnit
Modified method names to call the special public methods in the main program