start of a refactor

Working on a basic refactor.