Added some other usefull codes. For example: double buffering controls.