Remove semicolons, move helper functions into Vector2D class, introduce canRotate and canScale