add flatbuffers support
some cleanup
add flatbuffers support, not done