Revamped demo to have arbitrary rescale factors.