Refactor to remove dependencies from initial implimentation