Refactoring...more to come.