Added simulated drone to browser demo.

Also misc. code cleanup and added more tests.