Add functions and index layout.