Unit Tests and Bugfixes

Added unit tests. Found bugs with warping and composing warps.