refactoring functions' names and changed rendering to use sdl_renderer