Removed repeated entry-gathering code