Removing inused resources