Adding module with logic of rewrites for comparisons