Rebase pull request #265 from lodejard/dev

Rebased #265 on top of latest aspnet/dev
Add `private` to these methods. And `static` if possible.