Clean up use of props and state in LayerTree component