Refactor III

And more refactoring.