Fixed a few errors that prevented execution
More small fixes.
Restructured the for loop to the usual format
Initiated the boundaries for the box

They were missing, I am assuming it is supposed to be like this.
Reverting function replacement

Apparently this is a VS only thing.
Merge pull request #10 from thijser/datastructures

Merging some minor fixes to improve stability