Clean up sram functions