JML spec update
Update test method in main program
Fixed minor mistakes in code. Refactoring/