remove unused code
refactor for use in cloudcare
improve regex and indicator instance formatting