Move widgets into js