[cogenda-web] - Refactor code and fix some issues