add a few minor cleanups
hack in some stuff to built custom circuits; work-in-progress