Changes made by Neven Dinev (ndinev@gmail.com).