Merging changes from davehull/Kansa master.