Added multiple slots support
Changed big endian stuff to LE