some method cleanup (named scopes into methods). fix problems with creating environments for cloud:update task