Removed an unused variable and update timestamp the right way.