Savestate slot switching + code cleaning