Add support for private fields; add test cases