Changed JS_ASSERT to MOZ_ASSERT.
Code cleanup before review.
Fixed ma_or and ma_xor based on review from Heiher.