Unmerge documents

Please review carefully! Also contains some minor cleanup.