Fixed target handling using tree. Added textbox for editing the target