Ref #3722
This is a consolidation effort, avoiding usage of naked strings in codebase. Whenever possible use constants which can be repurposed elsewhere. This also fixes `goconst ./...` reported issues.
Repeated code around both object layers are moved and combined into simple re-usable functions.