Add comments, fix variable names