Implemented stitch method
Refactored tests