Refactored for testability
Added example project