Re estructure main file