Wrapping classes into an anonymous function.