Less exposed functions, and better types