Modified to ui and domain to be more separated.