Added the header files, fixed a few stupid bugs, and hunted down part of the NaN construction issue