re-organizing code in property.js