more descriptions in JavaDoc, minor code style fixed in code and
templates