Refactored some pieces of functionality inside views into partials