convert some "return nil" to just "return" in a bunch of places