Merging in TfT-02's changes.

This should merge in the changes made by @TfT-02 in his current pull request.