Refactor + separacion model-view