Fork from: https://bitbucket.org/fredrik_yttergren/lucidbot/wiki/Home