Replaced map with list comprehensions to appease pylint