Move js to separate file and reactivate background