Much refactor