Fix c++03 deprecated types and correct the number formatting reported by CarCode
Fix performance warning

Fix tab to spaces