cleanup/refactor. much more to come.