Fix to operator precidense, updated unit tests