Cleaned the code.  Refs #7476.
Merge branch 'feature/7476_new_costfun_rwp' into develop