Add missing timestamp() calculation function
Remove extraneous code