Made everything more robust
Fixed a few bugs and off by 1 errors
Updated and improved many other things