Cleaning up and documenting Device.