Reduce complexity and duplication; make accessor definition more explicit
Refactor root assignment to be more explicit
Merge branch 'reduce-serializer-code-complexity'