refactor pass 7 - cleanup / comments
refactor pass 8 - make it compile; need client rotation stuff fixed
still
refactor pass 9 - beginning of reimplementation