stigs: add changes from jborozan and refactor