Really big refactoring
Small changes