Fixed minor errors and added one line.