Fix edge-cases in algorithms; Throw error when >1 pin used in an instance