Selection is working now, thread still with bugs.