Mostly implemented the fully expanded to-circuits representation

Signed-off-by: Andrew Miller <amiller@dappervision.com>