Finalized refactor overhaul