Refactor intrinsic stuff