Refactored use of property attribute to populate dictionary; added unit tests