Moving included card document attributes out to variables to prevent code reuse, fixes for that