Refactoring. Added timestamp protocol control.