general cleanup

moved the timestamp function so I only set that variable once.