Implemented module priorities used to sort modules before event fires. Closes #1