Testing reusable code

Replaced redundant with functions. Stopped after “#link-3”. To be
continued…