and internal documentation and commenting

Mirror Python docs for main API functions. Document all helper methods. Add comments for bundler-specific helper functions.