Handle complex random structure

Function now handles complex random structure (random slopes) for both lme4 and nlme