courtesy commit after long time absent
Moved common functionality to mkspec_common.py