Big refactor. Reordering packages