Fixed tables in problem p2.33 and other changes

Moved functions to top of file, deleted some code that was doubled by
Mirai and Peter