Fixed refactor bug.  Further refactoring.