added: 1) one more optimization 2) gradle script to run the app; made refactoring