cleaned spi_sseg and fixed a few bugs