The first working version with conditional placeholders

Have moved the initialization code back into the constructor as well.