Refactored code, added tests and added another example.