Made getting styles a separate function call