reworked focus_node and added has_focus and release_focus methods in tree