use cdnjs for vendor files
refactor and make it work
add some more validations