Circuits

Added the basis for circuits, currently untested