Matching code to latest thrift definition. Fixing some warnings