Move all private functions to _ prefix

- Fixes #233

This is a big commit, even though it's technically minor.