Use Jasmine's `waits` function instead of my own.

Also fixes JSHint error.