Improved program efficiency and structure