WIP - finalizing refactor