Final Version.

Some Bug to fix, such as multi instanciation of main_layout.