cleanup
extractProperties function and tests