Corrected comments and shortened code