More refactoring: divide runner and runtime a little more; better error handling