Major refactorinxy