Could anyone help me rewrite and tidy up this SSR please?

Top