Made use of the new range based for loop and removed some unneeded includes