Removed all sram logic, fixed compiler warnings and cleaned up code base