Modified program structure some more