Added code comments explaining what each function and variable does/is