Changes made by Dzhenko Penev (dzhenko@gmail.com).