style cleanup in document.lua