Updated NAN and fixed whitespace.
Adjust indentation
Minor improvements.
Fixed indentation.
Speed improvements.
Another fix.
Merge improvements.