Adding changes suggested by vhraban