Fixed #1 General Cleanup of Code

Fixed #1 Errors are now handled by a function.
Normalized indexes for arrays.
Created a vagrant testing environment.
Change Git ignore to not include vagrant's other junk.
General optimizations.