Add some replacer class and remove some hack functions