Fixed more bugs in Clip.
Added some function interfaces that use vector outputs.