Partial non-working refactor code-change; saved for future reference