Renamed some functions at models/image.php