Refactor rendering surface