Javascript branch-based note taker