Refactor rendering to use an ImmediateLayer