Restructure to move index and document actions away from each other