Completely Rewritten

No longer deleting preference keys by brute-force and otherwise completely rewritten.