1.2.2-7 (Add notes and javadoc)

1)Add notes and javadoc
2)Rename some var