Main circuits implementation. Test units for circuits.