An example on how to clean up code when handling collections