Classes and packages mega-refactor