Add close method, and try/catch error call method.
Add "resultSum" test method, and small refactoring.