removed debugging remnants, fixed whitespace and other stylistic issues