moving small pieces to index and api