Movie: Move the helper function outside.

There are timing issues because it was declared below `Spice.add`. So what happens is that the template gets rendered and finds that the helper function called `time` does not exist. CC @russellholt