Deleting scanner from class