refactor cover-related code to separate module