Fixed comments for haddock.
Minor change.
Applied flow algorithms to bipartite graphs. Improved comments.
Major refactoring (comments and imports).