Import xebal.

From https://gist.github.com/mcenirm/4644926