Issue fixes

This pull-request contains fixes to the following issues: #1 #4 #5 #6 #7 #8.
- Fixed race condition between fetch of last index and main execution
- Changed use of setInterval to setTimeout in a sync manner to prevent flood
- Refactoring to main application logic
- Added .npmignore and updated .gitignore
- Updated readme file and added TravisCI badge