Refactoring javascript + cosmetic improvements + index exclusive buttons hovering fix