very big refactor: now, the routes and controllers are generated at initialization. This simplify the code and avoid bugs