Added support for exponents, added tests for errors