Circuit Structure switch

Switched over to encapsulating all the circuit data in a structure, will
help us when we want to Cut and choose. Next up is code tidying into
right files.