Removed unused code and added jquery