Remove unused debug statement
Adding back TestPatch
Removing unnecessary small.patch file, moving creation of small patch to a method, using losslessEncoding