A little reorganization, and the addition of a testing framework. Now to
add some tests