Removed memory buffer and added sRam member and initialization.
Replaced buffer with spi ram.
Fixed some wrong variable types.