added sdl2 and small restructure