Building an electronic document management system