Fixed compiler warnings.

Got playback's code to compile. Closure warnings are gone. A lot of casting was done.