Rework to estructure more require js like