implemented a convenient bipartite graph class, based on numpy sparse matrices; should be used from now on; also some refactoring & additional testing