HAL-131: Move principal related tools to header