refactoring + chrome fixes