Incorporating all doc comments and adding flow diagrams