added unit-test and removed commented code.
removed unused testing main method