Updated for 1.7.2, still needs a few tweaks here and there.