Format Code and Remove and generalized AlertDialog