Add derive processing
Refactor process-derives function.