cleanup, moved proprietary arrays to the only place they are used.

implmented setSelection as SelectionRecord methods.