Updated $ method and resolved conflict with jQuery