Splits code into internal and external

Will allow the interface between the testable and untestable code to be
defined without altering the external handling.
Splits the js/html code into separate file

Still don't have good way to test impl without pulling it in.
Routes all troublesome calls through a class

Can change it for testing. Does seem a bit excessive at this point.
External now allows non const arguments

For tests must be sure that the variables don't carry over if they have
different behaviours configured.
External has generic types

Allows for testing to use mock versions
Add extremely simple test

Verifies that the interactions can be mocked enough to implement tests.
Merge branch 'feature/mockable' into develop