Abstract out some ProximityHider behaviour. Code formatting.