Automatic render shutdown

Closes #180