cleanup and documentation
initial precedence test passing
all precedence tests passing