Fix problems, adding comments