Added a parameter to the ArrayAdapter to make it undeprecated.
Removed unused variables and comments.