Don't use create_function()

Don’t use create_function() to initialize widgets, and move widget init
into the main class.