add config maxtimestamp and fix unit tests and PSR2 coding style