Fixed arithmetic operations and added tests for them