Bugid 98346 seo video snippets

Small code refactoring so it's not done in one function. Additionaly I wrote some unit tests for common usages and the scenario that caused a P2