This PR refactors most of the internals to make them easier to test (and also because the names didn't make sense). It adds unit tests for all internal components.
Reviewed-on: #2
Co-authored-by: Emmanuel BENOÎT <tseeker@nocternity.net>
Co-committed-by: Emmanuel BENOÎT <tseeker@nocternity.net>