major refactor to better support future dev work