Reorganization, tests

I modularized the stuff better, wrote tests for the three HOF I've
written