Re-name and slightly restructure much of the processor code

Re-name and slightly restructure much of the processor code, so that it is more obvious what the pieces are. This is intended to improve future maintenance.