Comments added. And functions :)