Much more robust santization. Not tested yet.