Refactor de gui a Main