holoirc: reformat and refactor code