Hamhuis, Ellis find deals in free agency days after being traded