Fixed a naming bug in utils.
Added more logging.
Implemented prioritization and thread-sage triggers.