fixing context resources and removing unused imports