More robust handling when tree gets cleared during execution
Added helper functions to keywords for highlighting