Properly separate tree and item editor JavaScript and CSS