Clearing bitmap implemented.
Fixing group moving - invalid class in type checking.
Fixing possible ArrayIndexOutOfBoundsException in calculateFreeCurve()