Use inheritance as much as possible in initialize

There were several places where we could reduce the code.