refactor(): split code into modules

Expose a better api (especially for from and to) in preparation for
conventional-github-release