Refactoring the listings slightly to reduce duplication