Extracts initialization code into separate classes
Merges with changes from Sandra