Final refactor, commented code waiting to be implemented in CPU, IO, and IRQ