Spaces to tabs, add classes to index