small improvements; client bugs removed; memory leaks fixed