Add comments and make minor changes