more cleanup and refactor.