My attempt for a different organization of logic in a web app