Refactor completely