add fragment for all astro types
code clean up & fix some small problems