Use list comprehenseions and map where applicaple.