Added operator precedence. The code isn't very good tbh, but it gets the job done for now :(