more refactoring.
more fixes