index.html is modified and code is refactored