Improved program structure