Refactoring to separate XML inflate standalone and page based