Basic functionality is there. Still need to create html output, and the
whole thing needs to be commented and cleaned up.
that said, the core code appears to be working correctly