more java doc and protection of internal classes.