Update and re factoring