Completed refactor and everything is working. Just need to collect technical debt now.