Timestamp code improvements, closes #14.