remove unused function flatten
move RNG initialization down
reorder functions so defined before called
hoist var declaration
break long lines
remove EOL whitespace
0.0.1