Various improvements. Now using new Fragment class.