refactoring of property API generator code