Boat pseudocode and cleanups

Cleaned up some things, removed redundancy, and added some new
pseudocode.