Fixes sim.wave2d and visualize

`sim.wave2d` and `visualize` now work again, so that should help figuring out how to fix the rest of the code.  Merging immediately

As a gripe, @wafels did a bad thing back in 2012 and added carriage returns to all of the lines in `wave2d.py` in commit @db4f9fb.  I'm reluctant to change it back because it will obscure the git history (again).