New style for header, add select function in autocomplete and code refactoring