Added check for debug_log_level out of range
Other minor cleaning up (mostly cosmetic)
For functions that modify GameParams object, using pointer instead of reference