Working on reimplementing GWT code in JavaScript