huge refractor starting
Large refactor