Remove domains logic out of compile script