Create `names` in constructor.

This prevents having to create the list everytime
the function is called.