Refactoring slice rendering.