Commented existing code, corrected some minor errors.