Add package-info.java for docs;  tiny refactor code.