Factory for groovy objects