Added 2D and 3D canvas tests

Also misc. improvements, including dynamically placed popups.