Implemented timestamps and subscriber funcs.
Moved utility code into module.