Code for TCP's Tutorials 52-58