To increase available RAM
Move constants to program memory instead of RAM
Use the F macro to move string literals to program memory. Serial.print("some string") is stored in RAM (dynamic memory), Serial.print(F("some string literal") is stored in program memory. Any function that uses the print class functions can use the F macro (e.g.client.print).
Avoid long "switch" statements
Switch statements use RAM for the Arduino believe it or not, replace any big ones with if else statements.