Fix new page selection for function using a context.
Comments and code formatting.
Refactor Demo theme setup to import missing templates even if the theme is already installed.
Handle registration after guest checkout.
Merge pull request #842 from intportg/dev

Handle registration after guest checkout + bug fixes