Don't define a class inside a method

.. some compilers don't like it.