updating doc, improving field/method macros, adding some tests