cleaned up code for privacy cleaner and added more try-catch statements