Separate layout and index