Merge pull request #51 from lambdabetaheta/overhaul

Beginning the overhaul. Sample of first 250 lines.