A big bloated commit, but now it's working. Just need a few more work on the plug-ins and calculation.