Remove code dulication