Added Compare function call with UIAlert. Various cleanup