Rewrite of class structure to conditional blocks. Preperations to allow variable declearation inside the conditions.