Modified edit template view to fetch all dependecies at once