Move private methods to separate headers

Also fixes a typo and adds two missing nullability annotations.