Got rid of jQuery dependancy — extracted those several methods.