Implemented basic rendering loop with resize support