P4 code branch

Contains new substitute function. Bryan will add issues to the main project site that illustrate issues with null attributes after aggregation.