Refactor of port of raet out of salt