Cleaned up the codes.  Refs #7788.