Complete restructuration to have MVC model