fixing docblocks and removing unused vars