Replaced list loops with list comprehension format for most