Moves all but client components out of main module
Updates fields function for new schema and testability