Refactoring and handling more types of results from JSX evaluation