Removing jQuery dependency from Javascript

Removed $ functions from Javascript and replaced them with vanilla Javascript code.