Used more concise map/filter syntax for list operations.