removed old comments, neatened up brackets and variable names