Refactoring background.js, add socket connection
Microrefactoring + added refreshing by socket