update regex to support embed and short urls, cleanup unused imports