Changed -r to -lr
Tidied up initialisation a bit, passes opts around less