Working with background scripts