More changes to work with new DocumentJS