Refactoring and more fixes related to radio buttons. Sample supplemented.