updated architecture, control structure. separating components into related files