Updating to 3.1.4.6

First run through of all code changes, gonna go back over this commit
again, but don't want to lose all my work, took a few hours to go over
it all once.