Improved Some Code