diff --git a/io_import_images_as_planes.py b/io_import_images_as_planes.py
index 87f0c6c6a05b6cfb8bf8d729cec7df98d06f468d..ea65284222d353cb05679b79a83cd7458013f03b 100644
--- a/io_import_images_as_planes.py
+++ b/io_import_images_as_planes.py
@@ -250,9 +250,7 @@ def getTexture(path, img):
     # ... otherwise create a new one and apply mapping.
     if not tex:
         name = path.rpartition('\\')[2].rpartition('.')[0]
-        tex = bpy.data.textures.new(name=name)
-        tex.type = 'IMAGE'
-        tex = tex.recast_type()
+        tex = bpy.data.textures.new(name=name, type='IMAGE')
         tex.image = img
 
     return tex
diff --git a/io_import_scene_mhx.py b/io_import_scene_mhx.py
index a669327be0ab86a0b79c03884974f2db7e1c6bd5..b8e54e9ba1910090a5124cfd3816d37b232571c2 100644
--- a/io_import_scene_mhx.py
+++ b/io_import_scene_mhx.py
@@ -779,11 +779,7 @@ def parseTexture(args, tokens):
 	global todo
 	if verbosity > 2:
 		print( "Parsing texture %s" % args )
-	name = args[0]
-	tex = bpy.data.textures.new(name)
-	typ = args[1]
-	tex.type = typ
-	tex = tex.recast_type()
+	tex = bpy.data.textures.new(name=args[0], type=args[1])
 	loadedData['Texture'][name] = tex
 	
 	for (key, val, sub) in tokens:
diff --git a/object_cloud_gen.py b/object_cloud_gen.py
index 5122871ea8a4fd32124407bf5d24b7f462dcb55b..4a08f4840f73b7970083fb6faa1575de6ce0d8ea 100644
--- a/object_cloud_gen.py
+++ b/object_cloud_gen.py
@@ -461,7 +461,7 @@ class GenerateCloud(bpy.types.Operator):
             bpy.ops.object.particle_system_add()
 
             #Particle settings setting it up!
-            cloudParticles = cloud.active_particle_system
+            cloudParticles = cloud.particle_systems.active
             cloudParticles.name = "CloudParticles"
             cloudParticles.settings.frame_start = 0
             cloudParticles.settings.frame_end = 0
@@ -507,11 +507,10 @@ class GenerateCloud(bpy.types.Operator):
 
             # Add a texture
             vMaterialTextureSlots = cloudMaterial.texture_slots
-            cloudtex = main.textures.new("CloudTex")
-            cloudMaterial.add_texture(cloudtex, 'ORCO')
-            cloudtex.type = 'CLOUDS'
+            cloudtex = main.textures.new("CloudTex", type='CLOUDS')
             cloudtex.noise_type = 'HARD_NOISE'
             cloudtex.noise_scale = 2
+            cloudMaterial.add_texture(cloudtex, 'ORCO')
 
             # Add a force field to the points.
             cloudField = bounds.field
@@ -528,10 +527,8 @@ class GenerateCloud(bpy.types.Operator):
             #bpy.ops.ptcache.bake(bake=False)
 
             # Add a Point Density texture
-            cloudPointDensity = main.textures.new("CloudPointDensity")
-            cloudPointDensity.type = 'POINT_DENSITY'
-            cloudMaterial.add_texture(cloudPointDensity, 'ORCO')
-            pDensity = vMaterialTextureSlots[1].texture
+            pDensity = main.textures.new("CloudPointDensity", 'POINT_DENSITY')
+            cloudMaterial.add_texture(pDensity, 'ORCO')
             vMaterialTextureSlots[1].use_map_density = True
             vMaterialTextureSlots[1].use_rgb_to_intensity = True
             vMaterialTextureSlots[1].texture_coords = 'GLOBAL'
diff --git a/space_view3d_materials_utils.py b/space_view3d_materials_utils.py
index 0a2abea397366474e45eb137a34b7b8c949d546b..d3c8252cc1691a4bb4da7515b463369f402e819d 100644
--- a/space_view3d_materials_utils.py
+++ b/space_view3d_materials_utils.py
@@ -398,25 +398,23 @@ def check_texture(img,mat):
     #makes a texture if needed
     #adds it to the material if it isn't there already
 
-    try: 
-        tex = bpy.data.textures[img.name]
-    except:
-        tex = bpy.data.textures.new(name=img.name)
-    finally:
-        tex.type = 'IMAGE'
-        tex = tex.recast_type()
-        tex.image = img
-
-        #see if the material already uses this tex
-        #add it if needed
-        found = False
-        for m in mat.texture_slots:
-            if m and m.texture == tex:
-                found = True
-                break
-        if not found and mat:
-            mat.add_texture(tex, texture_coordinates='UV', map_to='COLOR')
-    
+    tex = bpy.data.textures.get(img.name)
+
+    if tex is None:
+        tex = bpy.data.textures.new(name=img.name, type='IMAGE')
+
+    tex.image = img
+
+    #see if the material already uses this tex
+    #add it if needed
+    found = False
+    for m in mat.texture_slots:
+        if m and m.texture == tex:
+            found = True
+            break
+    if not found and mat:
+        mat.add_texture(tex, texture_coordinates='UV', map_to='COLOR')
+
 def texface_to_mat():
     # editmode check here!
     editmode = False