Added Circuit class+tests