Added basic arithmetic functions and better error handling