Refactored rendering functions into queue classes