Fix array sizes, increments and assignments.
Fix sysinfo checks and incrementing.