refactoring of comskip