Fixing couple of minor issues and some modifications