improved view scaling and alarm logic