Code Cleanup proximity sensor