Refactoring and adding run list support