* Clean code
* Report an error when the refinement does not have the same type
closes: #150