Remove jQuery usages

Also, very minor code style changes