Fixing some problems and Clean Up after merge.