Clean up tests and some code style
Require setuptools
Fix bug in ReferencePropertyField with no data and add test