First working version of dom to gl