Added drawing key-points of b-splines; Some code refactoring