Fixed bug in clip function
Fixed typo in closure
Removed unneccesary import