added options() function on the public API and refactored init to call it