Cleaned up gauge display code