Better comments

Added additional commenting to each function.