Changed to use jquery throughout, no more dom nodes