Made a refactor in the views module