Don't cut-and-paste code, refs #56.
Also fixing various errors with test files reorg.