Fixed links and added comments to functions/file headers