Removed unused and unnecessary code