Minor javascript refactoring
Add version check feature