added some unit tests for Rewriting, and test executable target