Program in working state, enough to be turned in. Only comments and cosmetics remain.