Refactoring.
Added class selection.