A bunch of cleanup and corrections to staging