formating
Added java doc and comments