Suggested refactoring of run.go

@myleshorton Our little discussion about the run.go file inspired me to propose this.  It's 25% less code and I think it's a lot easier to follow.  That said, I haven't tested it yet.  If you think it's worth it, I'm happy to test it and then we can process the PR.