Deduplicate menu location calculation code
Refactor store context menu code
Simplify store UI init