Head uses foldr instead of fold now.
Improvements after meeting.
Corrected indentation.