token-based rendering & other improvements