Large

Large refactor