Add some comments and test cases
More test cases and bug fixes
Add runs script