Added tests
Changed test cases
Fixed subValidMotion(..) & completed java doc