various fixes and cleanup for pages draft