Separate internal functions from public API.