Added real options and docs generating code (as in plugin)