Clearned up

Put through JSLint and JSHint.com

Note: ReIndexArray is no longer a global function/class
Made it work FAST!

took out the looping function and made a two layer array for the nodes
to simplify the creation of neighbors. Its also been through
JSLint/JSHint