Written by Daniel.
Source available on Github.