Done an ungodly amount of logic changes and the code is still completely untested, but now the logic works at least.