added replace tool and Makefiles