Code for TCP's Tutorials 24-33