Added frame weighting

I like this implementation :)