holoirc: cleanup code and fix some bugs