Implement reference set emptying
Less silly way of adding a header that will optimize better