Went through the code and used the macro and fixed a couple places that were using incorrect timestamp comparisons.