improved widget rendering + removed jQuery dependancy