Add logic data framework.

I have written up a basic infrastructure for handling all of the logical data. It is (hopefully) relatively extendable and can flexibly work to simplify the main project.