cleanup structure of JSX components; some performance tweaks