Adds big refactor