Added code from Thelema.