Closed #24 by the NXT server impl with Thrift.

And some bug fixes.