Powers Work With Brackets

The problem was it was converting the text behind the "^" to a double
right away but if there was a $ for brackets it would return 0 so it
wouldn't work. Fixed it so it works with brackets by checking if the
character before the ^ is a $ or not.