cleaned up schematic and fixed some issues