Added assertions and made on/off/emit strict in their arguments.