Nearby feature code cleanup