Cleaned the codes. Refs #8291.