tests refactoring + selenium tests