Slowly getting nested attribute functionality to work