Changing program structure, prepare for module support