updating package, adding support of options, categories, table of contents, refactoring code