Updates to the module to make it more standard, and so that the
proper events are called.