Pulled in more changes from Master, keeping good ones from code-cleanup