Splitted the main into main, header and footer