added comments on every method and fixed variables that wernt being
used.