Rewriting/reformatting + tried to address comments from @EricRothstein + added todos for finalization