Clear up property accessor generation logic. Tests refined.
add some comments