Clear up and beginning of refactor.