removed old js
added comments on functions
added distinct display of selected
fixed distinct by sequence
added remove