Made scripts and images controllers work for returning resources