Code restructure 3