Refactored JS structure and removed old browsers