improve read_meta and support for theme vars.