various improvements (described)

fixed the file import error after encountering an error
fixed the GL context issue (inefficient method though)
added image script support

still unstable though, lots of imports break it