Program Fixes and Restructure

Program overhaul.