Further refactoring of bool primops (build works)