New internal redesign

Lines of code: 8836 => 3695