clean up deprication warning and private browsing code