Expand plan refactoring