Check this link for a great post on index defrag script http://sqlfool.com/2009/03/
After dropping a database you should backup "master" database because deleting database update master database. If not, then if you want to restore "master" at some point then it would have reference to the non-existing databases