Checking circuit validity

Also a cheatsheet. For now not allowing 'mergers' in circuits