removeNodeByName :: String -> Graph -> Graph
removeNodeByName n g = Graph (filter (/= (qnode n)) (nodes g))
                         (map (decrementIfHigherIndex loc)
                              (removeConnectedEdges loc (edges g)))
    where loc = getIndex n g
removeNodeByName :: String -> Graph -> Graph
removeNodeByName n g = Graph (filter (/= (qnode n)) (nodes g))
                         (map (decrementIfHigherIndex loc)
                              (removeConnectedEdges loc (edges g)))
    where loc = getIndex n g
removeNodeByName n g = Graph (filter (/= (qnode n)) (nodes g))
                         (map (decrementIfHigherIndex loc)
                              (removeConnectedEdges loc (edges g)))
    where loc = getIndex n g