Minor changes in implementation