Structuring web apps the right way