Added parts from @kcalkmc and @DMiller5383