Added badge for coverage.
Centralised generic code