Modified formatting and removed debugging statements