onItemClick added.

This is the new pull request with code clean up. :smile_cat: