Align popfile keys, only load templates we need, detect possible missing Templates, and fix a few popfile errors caused by missing brackets and such.