Fix for datashaping comitted. Add options for printing debug lines.