Updating from gluxon's phpwolf