Added functionality by taking on some technical debt (hacks abound). Mostly functional though.