Code for TCP's Tutorials 34-45