Refactor Stage Engine