Move vertical alignment calculation into variables for avatar module