Cheats: Fix stack overflow error

Also, minor code formatting changes