Added ability to register classes in widget markup.