fix memory used, removing trailing spaces.

Important change: `used = int(ram[1]) - int(ram[5]) - int(ram[6])` which gives the correct value for memory used.