TimeStamp refactoring and added junit TimeStampTest