Added rendering orders to objects.

Also prefixed non-thread-safe function calls with 'nts'.