More refactoring to share code between POS and Web UIs
Almost done?!