Re-did genshrink() and sanitize()

Apparently my code was very chunky and PHP5 has built in stuff to do this for me :)