Fix UI rendering, add possibility to configure output format, fix various bugs, update documentation