small refactorings, bugs fixed
get server reconnect right, fix timestamps