Refactor bulk docs normalization for better code separation