Refactor manual gateway and add tests
Merge pull request #16 from sharoonthomas/develop

Refactor manual gateway and add tests