Added operators to Q object and unit tests.