Made formatting consistent with rest of ngraph

I usually use 2 spaces everywhere else
Use object.keys for iteration when possible

Apparently it is 1.3x faster than regular `for in` loop
0.0.5