new manual page and some code improvements