Refactoring the timestamp callbkacks