closed #2384
refactors to sitemap, closed #2254
first pass, #1984
second pass, #1984
final pass, #1984
removed extra db call #2254
merge