cleanup
preseve current behavior is new BG_* and ALARM_TYPES ENV isn't set

also some cleanup of the int ENV parsing