Get degree of freedom function

Filled in the get degree of freedom function. The class had the data
member and set function but not get function. Fixed other little errors
that came with this addition.