diff --git a/Cargo.toml b/Cargo.toml
index 1f156f8e083d2e6bde182f00cef0cf7dc610911a..4c9a07936ec603776779d580667fa62745c52584 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,16 +3,18 @@ name = "lcms2"
 authors = ["Kornel Lesiński <kornel@geekhood.net>"]
 description = "ICC color profile handling. Rusty wrapper for Little CMS"
 keywords = ["icc", "profile", "color", "lcms"]
-include = ["src/**/*", "tests/**/*", "examples/**/*", "Cargo.toml", "README.md"]
+include = ["src/**/*", "Cargo.toml", "README.md"]
 readme = "README.md"
 license = "MIT"
-documentation = "https://pornel.github.io/rust-lcms2/lcms2/"
-repository = "https://github.com/pornel/rust-lcms2.git"
+homepage = "https://crates.rs/crates/lcms2"
+documentation = "https://kornelski.github.io/rust-lcms2/lcms2/"
+repository = "https://github.com/kornelski/rust-lcms2.git"
 categories = ["multimedia::images", "api-bindings"]
-version = "5.0.1"
+version = "5.1.1"
+edition = "2018"
 
 [dependencies]
-foreign-types = "0.3.0"
+foreign-types = "0.4.0"
 lcms2-sys = "2.4.7"
 
 [features]
diff --git a/README.md b/README.md
index 8b6d1eae00b37d537a89ce294ead2b76152baf1f..33ee03d6f42eeccd59363677ae5ee41237c17f2b 100644
--- a/README.md
+++ b/README.md
@@ -2,11 +2,9 @@
 
 Convert and apply color profiles with a safe abstraction layer for the LCMS library.
 
-See [API reference](https://docs.rs/lcms2/) for Rust functions and the [LCMS2 documentation HTML](https://pornel.github.io/rust-lcms2-sys/)/[PDF](http://www.littlecms.com/LittleCMS2.8%20API.pdf) for more background information about the functions.
+See [API reference](https://docs.rs/lcms2/) for Rust functions and the [LCMS2 documentation HTML](https://kornelski.github.io/rust-lcms2-sys/)/[PDF](http://www.littlecms.com/LittleCMS2.8%20API.pdf) for more background information about the functions.
 
 ```rust
-extern crate rgb;
-extern crate lcms2;
 use lcms2::*;
 
 fn example() -> Result<(), std::io::Error> {
@@ -42,7 +40,7 @@ if b"ICC_PROFILE\0" == &app2_marker_data[0..12] {
 
 There's more in the `examples` directory.
 
-This crate requires Rust 1.20 or later. It's up to date with LCMS 2.8 (should work with 2.6 to 2.9).
+This crate requires Rust 1.33 or later. It's up to date with LCMS 2.9, and should work with 2.6 to 2.9.
 
 ## Threads
 
diff --git a/examples/compare.rs b/examples/compare.rs
index 5c0b81ba725c5da2c5833e8d393f690c13252a1e..e28f827d770a5b9647a436eea0cd46841ee3150d 100644
--- a/examples/compare.rs
+++ b/examples/compare.rs
@@ -1,6 +1,3 @@
-#![feature(iterator_step_by)]
-#![allow(deprecated)]
-
 extern crate lcms2;
 use lcms2::*;
 
diff --git a/src/flags.rs b/src/flags.rs
index 429fbe872e8366266e36e9f11929dbc68f6dfc34..d33b1f5ae93b7e1472e2ecb3a14d3656786b68fa 100644
--- a/src/flags.rs
+++ b/src/flags.rs
@@ -1,4 +1,4 @@
-use ffi;
+use crate::ffi;
 use std::ops;
 
 #[derive(Debug, Copy, Clone)]
diff --git a/src/lib.rs b/src/lib.rs
index 2073ae15348296ec19dc3585d9e75629438b7af3..e988bc066ee5948c42bd8f0424e5f7d7ec80777e 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,9 +1,9 @@
-//! See [Little CMS full documentation](https://pornel.github.io/rust-lcms2-sys/) for more in-depth information about LCMS functions.
+//! See [Little CMS full documentation](https://kornelski.github.io/rust-lcms2-sys/) for more in-depth information about LCMS functions.
 //!
 //! The main types you need to use in this crate are `Profile` and `Transform`
 #![allow(dead_code)]
-#![doc(html_logo_url = "https://pornel.github.io/rust-lcms2/lcms_logo.png")]
-#![doc(html_root_url = "https://pornel.github.io/rust-lcms2")]
+#![doc(html_logo_url = "https://kornelski.github.io/rust-lcms2/lcms_logo.png")]
+#![doc(html_root_url = "https://kornelski.github.io/rust-lcms2")]
 
 extern crate lcms2_sys as ffi;
 
@@ -27,36 +27,36 @@ mod tonecurve;
 mod error;
 use std::marker::PhantomData;
 
-pub use profile::*;
-pub use error::*;
-pub use ciecam::*;
-pub use context::{GlobalContext, ThreadContext};
-pub use mlu::*;
-pub use ext::*;
-pub use flags::*;
-pub use locale::*;
-pub use pipeline::*;
-pub use stage::*;
-pub use transform::*;
-pub use tonecurve::*;
-pub use namedcolorlist::*;
+pub use crate::profile::*;
+pub use crate::error::*;
+pub use crate::ciecam::*;
+pub use crate::context::{GlobalContext, ThreadContext};
+pub use crate::mlu::*;
+pub use crate::ext::*;
+pub use crate::flags::*;
+pub use crate::locale::*;
+pub use crate::pipeline::*;
+pub use crate::stage::*;
+pub use crate::transform::*;
+pub use crate::tonecurve::*;
+pub use crate::namedcolorlist::*;
 
-pub use ffi::CIEXYZ;
-pub use ffi::CIELab;
+pub use crate::ffi::CIEXYZ;
+pub use crate::ffi::CIELab;
 #[doc(hidden)]
-pub use ffi::CIExyYTRIPLE;
+pub use crate::ffi::CIExyYTRIPLE;
 #[doc(hidden)]
-pub use ffi::CIExyY;
+pub use crate::ffi::CIExyY;
 #[doc(hidden)]
-pub use ffi::JCh;
+pub use crate::ffi::JCh;
 
-pub use ffi::PixelFormat;
-pub use ffi::InfoType;
-pub use ffi::TagSignature;
-pub use ffi::Intent;
-pub use ffi::ColorSpaceSignature;
-pub use ffi::ProfileClassSignature;
-pub use ffi::ViewingConditions;
+pub use crate::ffi::PixelFormat;
+pub use crate::ffi::InfoType;
+pub use crate::ffi::TagSignature;
+pub use crate::ffi::Intent;
+pub use crate::ffi::ColorSpaceSignature;
+pub use crate::ffi::ProfileClassSignature;
+pub use crate::ffi::ViewingConditions;
 
 #[derive(Debug)]
 /// Value of a tag in an ICC profile
diff --git a/src/mlu.rs b/src/mlu.rs
index b8634d26e1f5c8efb669b1e9d0cab3bce361dd4c..199f2b5cb298337eb6afb4ef35ddaade10b62a38 100644
--- a/src/mlu.rs
+++ b/src/mlu.rs
@@ -1,7 +1,7 @@
 use super::*;
 use std::fmt;
 use std::ffi::CString;
-use ffi::wchar_t;
+use crate::ffi::wchar_t;
 use std::iter::repeat;
 use std::ptr;
 use std::mem;
@@ -9,12 +9,12 @@ use std::char::{decode_utf16, REPLACEMENT_CHARACTER};
 use foreign_types::{ForeignType, ForeignTypeRef};
 
 foreign_type! {
-    type CType = ffi::MLU;
-    fn drop = ffi::cmsMLUfree;
     /// This represents owned Multi Localized Unicode type. Most methods are implemented on `MLURef`.
-    pub struct MLU;
     /// This is a borrwed Multi Localized Unicode type. It holds Unicode strings associated with `Locale`.
-    pub struct MLURef;
+    pub type MLU {
+        type CType = ffi::MLU;
+        fn drop = ffi::cmsMLUfree;
+    }
 }
 
 impl MLU {
diff --git a/src/namedcolorlist.rs b/src/namedcolorlist.rs
index e2ec2d1ce3cab62fbd7b84a0c037c9431239307d..12b8e9e5719103b6ff5fe94b3121ed6e7063e7e9 100644
--- a/src/namedcolorlist.rs
+++ b/src/namedcolorlist.rs
@@ -15,12 +15,11 @@ pub struct NamedColorInfo {
 }
 
 foreign_type! {
-    type CType = ffi::NAMEDCOLORLIST;
-    fn drop = ffi::cmsFreeNamedColorList;
-    /// Owned version of `NamedColorListRef`
-    pub struct NamedColorList;
     /// Palette of colors with names
-    pub struct NamedColorListRef;
+    pub type NamedColorList {
+        type CType = ffi::NAMEDCOLORLIST;
+        fn drop = ffi::cmsFreeNamedColorList;
+    }
 }
 
 impl NamedColorList {
diff --git a/src/pipeline.rs b/src/pipeline.rs
index 4e900597b2f5c55003af3f8b16b60f0a3550941e..040253e25e570d8577e402a129d8c4de29ae7067 100644
--- a/src/pipeline.rs
+++ b/src/pipeline.rs
@@ -1,22 +1,23 @@
 use super::*;
 use std::fmt;
-use stage::*;
+use crate::stage::*;
 use std::ptr;
-use eval::FloatOrU16;
+use crate::eval::FloatOrU16;
 use foreign_types::ForeignTypeRef;
 
 foreign_type! {
-    #[doc(hidden)]
-    type CType = ffi::Pipeline;
-    fn drop = ffi::cmsPipelineFree;
-    fn clone = ffi::cmsPipelineDup;
-    /// This is an owned version of `PipelineRef`.
-    pub struct Pipeline;
     /// Pipelines are a convenient way to model complex operations on image data.
     ///
     /// Each pipeline may contain an arbitrary number of stages. Each stage performs a single operation.
     /// Pipelines may be optimized to be executed on a certain format (8 bits, for example) and can be saved as LUTs in ICC profiles.
-    pub struct PipelineRef;
+    ///
+    /// This is an owned version of `PipelineRef`.
+    #[doc(hidden)]
+    pub type Pipeline {
+        type CType = ffi::Pipeline;
+        fn drop = ffi::cmsPipelineFree;
+        fn clone = ffi::cmsPipelineDup;
+    }
 }
 
 impl Pipeline {
diff --git a/src/profile.rs b/src/profile.rs
index e585d7e29c96427a77f94bf96b3692eba1d2d0c6..cbfb7a73834fda9dfc4f0757fbf22d929ab16ca1 100644
--- a/src/profile.rs
+++ b/src/profile.rs
@@ -1,5 +1,5 @@
 use super::*;
-use context::Context;
+use crate::context::Context;
 use std::path::Path;
 use std::ptr;
 use std::io;
diff --git a/src/stage.rs b/src/stage.rs
index 4bdc9b1396e5aad3195463f91e0a6591d9277fd9..6bbf6a65efbe08985d05955594790b3365b7d9ac 100644
--- a/src/stage.rs
+++ b/src/stage.rs
@@ -1,22 +1,23 @@
 use super::*;
-use eval::FloatOrU16;
+use crate::eval::FloatOrU16;
 use std::fmt;
 use std::ptr;
 use foreign_types::ForeignTypeRef;
-use context::Context;
+use crate::context::Context;
 
 foreign_type! {
-    type CType = ffi::Stage;
-    fn drop = ffi::cmsStageFree;
-    /// This is an owned version of `Stage`.
-    pub struct Stage;
     /// Stage functions
     ///
     /// Stages are single-step operations that can be chained to create pipelines.
     /// Actual stage types does include matrices, tone curves, Look-up interpolation and user-defined.
     /// There are functions to create new stage types and a plug-in type to allow stages to be saved in multi profile elements tag types.
     /// See the plug-in API for further details.
-    pub struct StageRef;
+    ///
+    /// This is an owned version of `Stage`.
+    pub type Stage {
+        type CType = ffi::Stage;
+        fn drop = ffi::cmsStageFree;
+    }
 }
 
 impl Stage {
diff --git a/src/tag.rs b/src/tag.rs
index 25eb4ac669f848aeb45c9cd101e0a60195ae2c49..48060bda993944d0a1ba8a4197781bce74bd3a46 100644
--- a/src/tag.rs
+++ b/src/tag.rs
@@ -10,7 +10,7 @@ impl<'a> Tag<'a> {
     }
 
     pub unsafe fn data_for_signature(&self, sig: TagSignature) -> *const u8 {
-        use TagSignature::*;
+        use crate::TagSignature::*;
         match (sig, self) {
             (RedColorantTag, &Tag::CIEXYZ(data)) |
             (BlueColorantTag, &Tag::CIEXYZ(data)) |
@@ -99,7 +99,7 @@ impl<'a> Tag<'a> {
         if data.is_null() {
             return Tag::None;
         }
-        use TagSignature::*;
+        use crate::TagSignature::*;
         match sig {
             BlueColorantTag |
             GreenColorantTag |
diff --git a/src/tonecurve.rs b/src/tonecurve.rs
index 4bada58458f817927a0421f8d62603cebdc79256..eba5cf1d57d7244f238aa4bdcb910d30a9ae1cdb 100644
--- a/src/tonecurve.rs
+++ b/src/tonecurve.rs
@@ -1,19 +1,20 @@
 use super::*;
 use std::fmt;
 use std::ptr;
-use eval::FloatOrU16;
+use crate::eval::FloatOrU16;
 use foreign_types::{ForeignType, ForeignTypeRef};
 
 foreign_type! {
-    type CType = ffi::ToneCurve;
-    fn drop = ffi::cmsFreeToneCurve;
-    fn clone = ffi::cmsDupToneCurve;
-    /// Owned version of `ToneCurveRef`
-    pub struct ToneCurve;
     /// Tone curves are powerful constructs that can contain curves specified in diverse ways.
     ///
     /// The curve is stored in segments, where each segment can be sampled or specified by parameters. A 16.bit simplification of the *whole* curve is kept for optimization purposes. For float operation, each segment is evaluated separately. Plug-ins may be used to define new parametric schemes.
-    pub struct ToneCurveRef;
+    ///
+    /// Owned version of `ToneCurveRef`
+    pub type ToneCurve {
+        type CType = ffi::ToneCurve;
+        fn drop = ffi::cmsFreeToneCurve;
+        fn clone = ffi::cmsDupToneCurve;
+    }
 }
 
 impl ToneCurve {
diff --git a/src/transform.rs b/src/transform.rs
index 329ff6fc9703abdb815df0627e484972ca6c3b5e..51fe584da7e394af21f4418d837aeb41ed9d23fe 100644
--- a/src/transform.rs
+++ b/src/transform.rs
@@ -1,5 +1,5 @@
 use super::*;
-use context::Context;
+use crate::context::Context;
 use std::os::raw::c_void;
 use std::marker::PhantomData;