refactor swapscreen()
Merge branch 'master' into mitch