doc: refactor options and functions