Add script to apply refine operations, add refine operations json files, update makefile