Made code more readable

Some code was improved, but most is still really bad.  I also updated
the README, but a more thorough README will come later.