Minor changes
Replaced redundant code