First working implementation of circuit library along with a simple test