Added support for subcircuits -- still not done but started.