Moved Fielding and Indexing to a separate function

No tests have been made