Fixed a couple of missing headers.
Fixed a bug in an undefined reference.  I am not sure why that wasn't throwing at least a warning.