cs fixes + some javadoc