Added javadoc
Added javadoc
Added javadoc
Added javadoc
rearanged oder of function and inner classes