code cleaning and style for current selected node