Refactor some of loop to follow original
Refactor file permissions
Add build script that copies libtgl files
Update tg submodule and build script
Update to new libtgl API