Rename refactoring, errors handaling, error tests