Implement operator precedence

Closes #2.