Update minimize.php

Rewrite. Added debug mode.