expose options/vars for API

There's a lot of newline differences in the diff, due to my editor removing trailing whitespace, but this simply exposes the vars/options to the API functions.