Refactor session functionality to non-singleton and add BUILDER_LAYER.