Changed some uses of lists:map and lists:filter to comprehensions